<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">
<link href="{THEME_STYLE_PATH}style/css/default_new.css" type="text/css" rel="stylesheet" />
<script src="{THEME_STYLE_PATH}style/js/jquery.min.js"></script>
<script src="{THEME_STYLE_PATH}style/js/core.js"></script>
<link href="{THEME_STYLE_PATH}style/css/percenter.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
</style>
<![endif]-->
</head>

<body>
		
	{include template('header','common')}
	<div id="Mainbox">
<!--插入侧边栏-->
		{include template('sidebar_login','common')}
		<!--插入侧边栏-->
		{include template('top_advance','common')}
		
		<!-- 左侧 -->
		{include template('member_left','common')}
		<!--右侧-->
		<div class="percenter_right">
			<div class="aboutper_acc">
				<p class="a1" style="margin-bottom:10px;">详细资料<span class="a1">为了您更好的体验本站提供的服务，请填写真实信息。</span></p>
				<div class="detail_tips">依据自由自愿的原则，您可以选择填写以下资料或不填写，但如果<span class="re1">你需要申请提现或兑换奖品</span>则一定要如实填写以下资料，如果所填内容涉嫌作假，我们有权冻结您的账号。
</div>
				<ul class="details_list">
					<li class="a1">登录邮箱：</li>
					<li class="a2">{$info['email']}&nbsp;<span class="da3">{if $info[email_status] == 1}（已经认证）{else}（未认证）{/if}</span></li>
					<li class="a1">个人头像：</li>
					<li class="a2" style="margin-bottom:10px;"><img src="{THEME_STYLE_PATH}style/avatar/default/<?php echo  getUserInfo($this->userid,'photo',TRUE);?>.jpg" width="60px;">&nbsp;<a href="{U('Member/Profile/portrait')}" class="b40link">[修改头像]</a></li>
					<li class="a1">真实姓名：</li>
					<li class="a2"><input name="real_name" id="tbUserName" value="{$detail['real_name']}" style=" width:80px;" type="text">&nbsp;&nbsp;<span class="da3" id="tbUserName_i">必填</span><span class="re1" id="tbUserName_w" style="display:none;">请输入2-10位正确的中文名称!</span></li>
					<li class="a1">性别：</li>
					<li class="a2">
					<select name="gender" id="tbUserGender">
					
					<option {if $detail['gender'] == 1}selected="selected" {/if} value="1">男</option>
					<option {if $detail['gender'] == 0}selected="selected" {/if} value="0">女</option>
					
					</select></li>
					<li class="a1">身份证号：</li>
					<li class="a2"><input name="card" id="tbUserCardID" value="{$detail['card']}" style=" width:130px;" type="text"></li>
					<li class="a1">电话号码：</li>
					<li class="a2"><input name="tel" id="tbUserTel1" value="<?php echo substr($detail['tel'],0,3)?>" maxlength="4" style="width:40px;" type="text">&nbsp;-&nbsp;<input name="tbUserTel2" id="tbUserTel2" value="<?php echo substr($detail['tel'],3)?>" maxlength="8" style="width:80px;" type="text"></li>
					<!--li class="a1">手机号码：</li>
					<li class="a2"><input type="text" name="tbUserPhone" id="tbUserPhone" maxLength="11" value=""  style="width:100px;"/>&nbsp;&nbsp;<span class="da3">必填</span></li-->
					<li class="a1">邮政编码：</li>
					<li class="a2"><input name="zip_code" id="tbUserPostCode" value="{$detail['zip_code']}" maxlength="6" style="width:60px" type="text"></li>
					<li class="a1">QQ号码：</li>
					<li class="a2"><input name="qq" id="tbUserQQ" maxlength="15" value="{$detail['qq']}" style="width:80px" type="text">&nbsp;&nbsp;<span class="da3">必填</span></li>
					<li class="a1">联系地址：</li>
					<li class="a2"><input name="address" id="tbUserAddr" value="{$detail['address']}" style="width:300px;" type="text">&nbsp;&nbsp;<span class="da3">必填，您兑换奖品是所用的收货地址</span></li>
					<li class="a1"></li>
					<li class="a2" style="margin-top:10px;"><a href="javascript:void(0);" onclick="modifyInfo()" class="editbtn">确认修改</a></li>
					<input name="userid" id="userid" type="hidden" value="{$info['userid']}"></input>
				</ul>
				
			</div>	
		</div>
		<!--右侧-->
		<div class="clear"></div>
	</div>
	<!--主体-->
	<!--尾部-->
{include template('footer','common')}
	<!--尾部-->


<script type="text/javascript">
function modifyInfo()
{
	var v = juxiangyou.component.verification;
	var userName = $.trim($('#tbUserName').val());
	var userGender = $('#tbUserGender').val();
	var userCardID = $.trim($('#tbUserCardID').val());
	var userTel1 = $.trim($('#tbUserTel1').val());
	var userTel2 = $.trim($('#tbUserTel2').val());
	var userPostCode = $.trim($('#tbUserPostCode').val());
	var userQQ = $.trim($('#tbUserQQ').val());
	var userAddr = $.trim($('#tbUserAddr').val());
	var userid=$.trim($('#userid').val());
	var modelid = '<?php echo $modelid;?>';

	if(v.chkChinese(userName)==false){
		$('#tbUserName').focus();
		return false;
	}
	if(v.chkInt(userQQ,5,12)==false){
		$('#tbUserQQ').focus();
		return false;
	}
	if(!userAddr){
		$('#tbUserAddr').focus();
		return false;
	}
	
	$.ajax({
		type: "POST",
		url: "{U('Member/Profile/profile_edit')}",
		dataType: "json",
		data : {"act":"modify","real_name":userName,"gender":userGender,"card":userCardID,"tel":userTel1,"tbUserTel2":userTel2,"zip_code":userPostCode,"qq":userQQ,"address":userAddr,"userid":userid,'modelid':modelid},
		success: function(data){
			if(data.flag == 0){
				juxiangyou.component.popup._reload = true;
				juxiangyou.component.popup.prompt(data.msg,300);
			}else{
				juxiangyou.component.popup._reload = false;
				juxiangyou.component.popup.prompt(data.msg,300);
			}
		}
	});
}

</script>
<script src="{THEME_STYLE_PATH}style/js/_tts_browser_center.js" data-message="1" data-version="1.4.2" data-browser="firefox" data-source="Firefox" data-guid="00000000124486F782E62C45AA7FA600" data-id="0011000820131018" charset="utf-8" type="text/javascript" id="J---TK-load"></script>
</body>
</html>